#include <iostream>
#include <string>
#include <vector>
using namespace std;

class Band
{
public:
    string _name;
    string _description;
    Band(const string &name, const string &description)
    :_name(name)
    ,_description(description)
    {}
    ~Band() {}
};

class Produce
{
public:
    string _name;
    double _price;
    Band* _band;
    Produce(const string &name, const double &price, Band* band) 
    :_name(name)
    ,_price(price)
    ,_band(band)
    {}
    ~Produce() {}
};

class Order
{
public:
    int _id;
    string _date;
    double _amount;
    Order(const int &id, const string &date, const double &amount) 
    :_id(id)
    ,_date(date)
    ,_amount(amount)
    {}
    ~Order() {}
};

class Customer
{
public:
    string _name;
    string _tel;
    vector<Order> _order;

    Customer(const string &name, const string &tel)
    :_name(name)
    ,_tel(tel)
    {}
    void addOrder(const Order &order)
    {
        _order.push_back(order);
    }
    ~Customer() {}
};

int main(int argc, char const *argv[])
{
    Band band1("xiaomi", "leiju");
    Band band2("huawei", "renzhengfei");
    Produce phone("hongmi", 2999, &band1);
    Order order1(1, "8.05", 9999);
    Order order2(2, "8.05", 8888);
    Customer tom("tom", "13456");
    tom.addOrder(order1);
    tom.addOrder(order2);

   cout << "Brand Information:" << endl;
    cout << "Name: " << band1._name << ", Description: " << band1._description << endl;
    cout << "Name: " << band2._name << ", Description: " << band2._description << endl;

    cout << "\nProduct Information:" << endl;
    cout << "Name: " << phone._name << ", Price: $" << phone._price << ", Brand: " << phone._band->_name << endl;

    cout << "\nCustomer Information:" << endl;
    cout << "Name: " << tom._name << ", Tel: " << tom._tel << endl;

    cout << "\nOrders:" << endl;
    for (const auto& ord : tom._order) {
        cout << "ID: " << ord._id << ", Date: " << ord._date << ", Amount: $" << ord._amount << endl;
    }
    return 0;
}
